x

Terminal, TTY & Bash

User input is converted into GUI events that're captured by xterm
user <---xterm---> tty <--- bash --->

xterm

xterm is a terminal. It's a graphical user program allowing us to communicate with the shell. We have to make a distinction between the graphical part of the terminal and the shell itself. As there are many types of terminal that use the same shell.

So terminals like xterm visualize the output of commands and pass user input to command line tools.

Bash

Bash is a command line interpreter
It understands the commands and executes them on the system. This is the difference between xterm and bash, bash is the operator of commands and executes them and the terminal is the way we interact with it graphically.

Bash is an implementation that handles the communication between a terminal and an interpreter.

tty

Without going into a ton of details, this is a sort of channel where data is exchanged bidirectionally.

Bash is an implementation of a command-line interpreter that executes commands on the OS.

Left-click: follow link, Right-click: select node, Scroll: zoom
x